/* 文档转换知识片段工具 CSS */

/* 全局样式 */
body {
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
}

/* 导航样式 */
.step-navigation {
    margin-bottom: 2rem;
}

.nav-pills .nav-link {
    color: #6c757d;
    border-radius: 0;
    padding: 1rem 2rem;
}

.nav-pills .nav-link.active {
    background-color: #0d6efd;
    color: white;
}

/* 卡片样式 */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.card-body {
    padding: 20px;
}

/* Markdown编辑器样式 */
.markdown-editor {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
    font-size: 14px;
    line-height: 1.6;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    resize: vertical;
}

.markdown-preview {
    background-color: white;
    min-height: 300px;
    overflow-y: auto;
}

/* Markdown预览中的图片样式 */
.markdown-preview img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
    border: 1px solid #eee;
    padding: 5px;
    transition: all 0.3s ease;
}

/* 新上传的图片高亮样式 */
.markdown-preview img.highlight-new {
    border: 2px solid #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
    transform: scale(1.02);
}

.markdown-preview img[title*="加载失败"] {
    border: 1px solid #dc3545;
    background-color: #f8d7da;
    padding: 10px;
}

/* QA列表样式 */
.qa-list {
    max-height: 600px;
    overflow-y: auto;
}

/* 图片上传按钮样式 */
.upload-image-btn {
    display: flex;
    align-items: center;
    gap: 5px;
}

.upload-image-btn i {
    font-size: 1.2rem;
}

/* 图片上传预览样式 */
.image-preview {
    margin-top: 10px;
    text-align: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 200px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
}

.qa-item {
    background-color: white;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.qa-item .card-header {
    background-color: #f8f9fa;
    padding: 0.75rem 1rem;
}

.qa-item .card-body {
    padding: 1rem;
}

.qa-item:hover {
    border-color: #0d6efd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.qa-question {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.qa-answer {
    color: #555;
    white-space: pre-wrap;
}

.qa-controls {
    position: absolute;
    top: 10px;
    right: 10px;
}

/* 进度条样式 */
.progress {
    height: 0.5rem;
    margin-bottom: 1rem;
}

/* 按钮样式 */
.btn {
    padding: 0.5rem 1rem;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* 表单样式 */
.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 错误提示样式 */
.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .nav-pills .nav-link {
        padding: 0.5rem 1rem;
    }
    
    .markdown-editor,
    .markdown-preview {
        min-height: 200px;
    }
    
    .qa-list {
        max-height: 400px;
    }
    
    .card-header {
        flex-direction: column;
    }
}

/* 动画效果 */
.spin {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 